﻿using System.Reflection;
using System.Threading.Tasks;
using Sharp.Infrastructure.AutoMapper;
using Sharp.Infrastructure.Interfaces;

namespace Sharp.WebBooter
{
    public class AutoMapperBootStrapper : IBootstrapPlugin
    {
        public Assembly[] StartupAssembles { get; set; }
        public int Order { get; set; }

        public void Initialize()
        {
            new AutoMapperInitialize().Initialize(StartupAssembles);
        }

        public Task InitializeAsync()
        {
            return Task.Run(() =>
            {
                this.IsAlready = true;
            });
        }

        public bool IsAlready { get; set; }
    }
}